<#import "inc/page_comm.ftl" as comm />
<@comm.userMenu/>      
<script language="javascript" src="javascript/jsCheck.js"></script>
<div class="dedeMain">
        <!--
        <div class="titleBar bgGreen lineTB">
          <form name='form3' action='content_list.php' method='get'>
            <div class="fLeft" style="margin-top:3px">
              <input type='hidden' name='dopost' value='listArchives' />
              <input type='hidden' name='channelid' value='1'>
             		 关键字：
              <input class="text" type='text' name='keyword' value='' style='width:140px' />
              <button class="button2" type="submit">提交</button>
            </div>
            <div class="fRight" style="padding-right:10px"><select  name='mtypesid' onchange='location.href=this.value' size='1'>
<option value='0'>请选择分类...</option>
<option value='content_list.php?channelid=1'>所有文章</option>
</select>            </div>
          </form>
        </div>
        -->
      <div class="dedeMain">
        <div class="location"><span class="titAddChannel1 icon">发表</span>普通文章</div>
        <form class="mTB10 mL10 mR10" name="form1" action="addInfo.action" method="post" enctype="multipart/form-data" onsubmit="return checkSubmit();">
          <input type="hidden" name="info.id" value="${info.id?default("")}" />
          <table cellspacing="1" class="submit">
            <thead>
              <tr>
                <th colspan="2" ><strong>常规参数</strong></th>
              </tr>
            </thead>
            <tbody>
              <tr>
                <td width="15%" align="right" valign="top">标题：</td>
                <td><input name="info.title" type="text" id="title" value="${info.title?default("")}" size="30" class="text" style="width:400px;"/>
                  <span style="color:#F00">*</span></td>
              </tr>
              <tr>
                <td align="right" valign="top">作者：</td>
                <td><input type="text" readOnly="true" name="info.user.username" value="${username}" id="writer" size="30" class="text"  /></td>
              </tr>
              <tr>
                <td align="right" valign="top">设施：</td>
                <td><input type="text" name="info.ss" value="${info.ss?default("")}" id="info.ss" size="30" class="text"  /></td>
              </tr>
              <tr>
                <td align="right" valign="top">联系电话：</td>
                <td><input type="text" name="info.contart" value="${info.contart?default("")}" id="info.contart" size="30" class="text"  /></td>
              </tr>
              <tr>
                <td align="right" valign="top">地点：</td>
                <td><input type="text" name="info.place" value="${info.place?default("")}" id="info.place" size="30" class="text"  /></td>
              </tr>
              <tr>
                <td align="right" valign="top">价格：</td>
                <td><input type="text" name="info.price" value="${info.price?default("")}" id="info.price" size="30" class="text"  /></td>
              </tr>
              <tr>
                <td align="right" valign="top">有效期：</td>
                <td><input type="text" name="info.endDate" value="${info.endDate?default("")}" id="info.endDate" size="30" class="text"  /></td>
              </tr>
              
              <tr>
                <td align="right" valign="top">隶属栏目：</td>
                <td>
					<select name='info.parentType.id' size='1'>
					
             <#if (fartherType?exists)>
             <#list fartherType.parentType as object>
	             <#if (object.id==pid)>
								<option value='${object.id}' class='option3' selected>${object.name}</option>
								<#else/>
								<option value='${object.id}' class='option3'>${object.name}</option>
				 </#if>
			 </#list>
			 </#if>
					</select>                  
				</td>
              </tr>
             
              <tr>
                <td align="right" valign="top">信息摘要：</td>
                <td><textarea name="info.content" id="description" style="height:50px"></textarea>
                  (内容的简要说明) </td>
              </tr>
              <tr>
                <td align="right" valign="top">缩略图：</td>
                <td><input class="file" id="file" name="fileUpload" type="file" style="width:408px" onChange="javascript:checkFile(this)"/>
                  <div id='divpicview' class='divpre'></div></td>
              </tr>
              <!--
                            <tr>
                <td align="right" valign="top">验证码：</td>
                <td><input class="text" name="vdcode" type="text" id="vdcode" size="10" style='width:50px;text-transform:uppercase;' />
                  <img src='web/vdimgck0.jpg' alt="验证码" width='50' height='20' align="absmiddle" alt="看不清？点击更换" align="absmiddle" style="cursor:pointer" onclick="this.src=this.src+'?'" /></td>
              </tr>
              -->
                          </tbody>
            <tfoot>
              <tr>
                <td height="45">&nbsp;</td>
                <td height="45"><button class="button2" type="submit">提交</button>
                  <button class="button2 mL10" type="reset" onclick="location.reload();">重置</button></td>
              </tr>
            </tfoot>
          </table>
        </form>
      </div>
      <div class="clear"></div>
    </div>
    <div class="clear"></div>
  </div>
</div>
<script language="javascript" type="text/javascript">
function checkFile(obj)
{
   if(isZip(obj.value))
   {  
       max_size=2097152;
}
   else  {
       max_size=307200;  
  }
   if(chkExtend(obj.value)!=0)
   {
    alert("文件格式不允许上传，请您检查！");
    obj.outerHTML=obj.outerHTML;
    return false;
   }
   if(isImg(obj.value))
   {
    chkImgSize(obj);   
   }  
  
   if(!checkFileSize(obj.value))
   {
    alert("文件大小超出了"+max_size/1024+"kb\n请使用WinRAR或WinZip软件压缩后再试！");
    obj.outerHTML=obj.outerHTML;
    return false;
   } 
}
</script>
<script language="javascript" type="text/javascript">
	window.onload=function (){
		setInterval("document.getElementById('time').innerHTML=new Date().toLocaleString()+' 星期'+'日一二三四五六'.charAt(new Date().getDay());",1000);
	}
	
</script>

<div class="wrapper footer">
  <div class="fLeft mL10"> Powered by daliwap.com &copy; 2005-2010大理生活网 版权所有</div>
  <div class="fRight mR10" id="time"></div>
  <div class="clear"></div>
</div>
</body>
</html>